<!--
 * @Author: lbt666 '1319451895@qq.com'
 * @Date: 2022-08-09 11:27:29
 * @LastEditors: lbt666 '1319451895@qq.com'
 * @LastEditTime: 2022-08-11 16:30:25
 * @Description: 
-->
<template>
  <div class="loadingStyle" v-if="props.showLoading">
    <van-overlay :show="true" class="overlay">
      <div class="load">
        <div class="ing">
          <img src="@/assets/loading.png" alt="">
          <div class="time">
            <div class="num">{{ countDown }}</div>
            <div class="unit">s</div>
          </div>
        </div>
        <div class="text1">PaymentResults</div>
        <div class="text2">SubmitAgain</div>
      </div>
    </van-overlay>
  </div>
</template>
<script setup lang="ts">

const props = defineProps({
  showLoading: {
    type: Boolean,
    default: true,
    required: true
  },
  countDown: {
    type: Number,
    required: true
  }
})
</script>
<style scoped lang="less">
.loadingStyle {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  display: flex;
  z-index: 100;
  text-align: center;
  display: flex;

  .overlay {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .load {
    .time {
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      top: 0;

      .num {
        font-size: 27px;
        line-height: 1;
        font-weight: 500;
        color: #63ABFF;
      }

      .unit {
        font-size: 20px;
        font-weight: 500;
        color: #63ABFF;
        line-height: 1px;
        margin-left: 6px;
      }
    }

    .ing {
      width: 135px;
      height: 135px;
      position: relative;
      margin: auto;

      img {
        animation: van-rotates var(--van-loading-spinner-animation-duration) linear infinite;
        animation-duration: 2s;
      }

      @keyframes van-rotates {
        0% {
          transform: rotate(360deg);
        }

        100% {
          transform: rotate(0);
        }
      }
    }
  }

  .icon {
    margin: auto;
  }

  .text1,
  .text2 {
    margin-top: 15px;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    color: #63ABFF;
    line-height: 11px;
  }

  .text2 {
    margin-top: 10px;
  }
}
</style>